package com.rattkin.business
{
	import flash.events.Event;
	
	import mx.messaging.ChannelSet;
	import mx.messaging.channels.AMFChannel;

	public class ConfigManager extends BaseManager
	{				
		private var _amfUrl:String;			   		 
		private var _amfChannelSet:ChannelSet;						

		[Bindable(event="amfChanged")]	
		public function get amfUrl():String {
			return _amfUrl;
		}

		[Bindable(event="amfChanged")]			
		public function get amfChannelSet():ChannelSet {
			return _amfChannelSet;
		}		
		
		public function setAmf(amfUrl:String):void {
			this._amfUrl = amfUrl;	
			_amfChannelSet = new ChannelSet();
			var channel:AMFChannel = new AMFChannel("my-zend", _amfUrl);
			_amfChannelSet.addChannel(channel);
			
			dispatchEvent(new Event("amfChanged"));	
		}
	}
}